package bl.tools;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class LOCCTotal {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		System.out.println(count(args[0]));
	}
	
	public static int count(String file) throws IOException{
		FileReader fr = new FileReader(file);
		BufferedReader br = new BufferedReader(fr);
		int lines = 0;
		String line;
		while( (line = br.readLine()) != null ){
			if(line.indexOf("Total Lines: ") != -1){
				lines += Integer.parseInt(line.substring(13));
			}
		}
		return lines;
	}

}
